/**
 * wx.提示相关
 */

//toast中间文本提示  
const toast = msg => {
  wx.showToast({
    title: msg,
    icon: 'none',
    duration: 2500
  })
}

//加载中
const loading = (o = { title: '加载中' }) => {
  wx.showLoading({
    title: o.title,
  })
}

//关闭加载中
const hideloading = () => {
  wx.hideLoading()
}

export default {
  toast,
  loading,
  hideloading,
}